package cn.wizzer.app.user.modules.services;

import cn.wizzer.app.user.modules.models.UserPurchase;
import cn.wizzer.app.user.modules.models.enums.PurchaseEnum;
import cn.wizzer.framework.base.service.BaseService;
import cn.wizzer.framework.page.Pagination;

public interface UserPurchaseService extends BaseService<UserPurchase> {
    /**
     * 后台用户购买记录
     *
     * @param pageNumber
     * @param pageSize
     * @param searchKeyword
     * @param searchDate
     * @param status
     * @return
     */
    Pagination listPage(Integer pageNumber, int pageSize, String searchKeyword, String[] searchDate, PurchaseEnum status);

    /**
     * 前端购买记录
     *
     * @param pageNumber
     * @param pageSize
     * @param status
     * @param userId
     * @return
     */
    Pagination listPage(Integer pageNumber, int pageSize, PurchaseEnum status, String userId);

    void add(UserPurchase userPurchase);

    void cancel(String id);

}
